package cn.elricyu.tt.bean.shop;

import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import cn.elricyu.tt.bean.FunctionBean;

public class MyEquip extends FunctionBean {
	private int state;
	private Map<String, Equip> equipMap = new LinkedHashMap<String, Equip>();
	private int hasking;
	private int magic;
	private int magicstate;
	private long cd;
	private int cdflag;
	private int canusegold;
	private int cancrip;
	private int cripconsumelv;

	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public void addEquip(Equip equip) {
		String key = equip.getStoreid();
		if (!equipMap.containsKey(key)) {
			equipMap.put(key, equip);
		}
	}

	public List<Equip> getEquipList() {
		List<Equip> equipList = new ArrayList<Equip>(equipMap.size());
		equipList.addAll(equipMap.values());
		Collections.sort(equipList);
		return equipList;
	}

	public Equip getEquip(String key) {
		return equipMap.get(key);
	}

	public int getMagic() {
		return magic;
	}

	public void setMagic(int magic) {
		this.magic = magic;
	}

	public int getMagicstate() {
		return magicstate;
	}

	public void setMagicstate(int magicstate) {
		this.magicstate = magicstate;
	}

	public long getCd() {
		return cd;
	}

	public void setCd(long cd) {
		this.cd = cd;
	}

	public int getCdflag() {
		return cdflag;
	}

	public void setCdflag(int cdflag) {
		this.cdflag = cdflag;
	}

	public int getCanusegold() {
		return canusegold;
	}

	public void setCanusegold(int canusegold) {
		this.canusegold = canusegold;
	}

	public int getHasking() {
		return hasking;
	}

	public void setHasking(int hasking) {
		this.hasking = hasking;
	}

	public int getCancrip() {
		return cancrip;
	}

	public void setCancrip(int cancrip) {
		this.cancrip = cancrip;
	}

	public int getCripconsumelv() {
		return cripconsumelv;
	}

	public void setCripconsumelv(int cripconsumelv) {
		this.cripconsumelv = cripconsumelv;
	}

}
